package com.happy;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.Banner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;

/**
 * @Auther: lifeng
 * @Date: 2018/6/26 11:02
 * @Description:程序入口
 */
@SpringBootApplication
@MapperScan("com.happy.dao")
public class Application extends SpringBootServletInitializer {
    //启动类
    public static void main(String[] args) {
        SpringApplication application = new SpringApplication(Application.class);
        //关闭打印banner
        application.setBannerMode(Banner.Mode.OFF);
        application.run(args);
    }

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        //注意这里要指向原先main方法执行的application启动类
        return builder.sources(Application.class);
    }
}
